﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Root2.master" AutoEventWireup="true" CodeFile="DangNhap.aspx.cs" Inherits="DangNhap" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder_center" runat="Server">


    <style type="text/css">
        * {
            margin: 0;
            padding: 0;
            font-family: Calibri;
        }

        fieldset {
            background: #f8f8f8;
            border-radius: 7px;
            margin-bottom: 10px;
            margin-right: 10px;
            padding: 10px;
        }

            fieldset legend {
                display: block;
                background: #ffffff;
                margin-left: 20px;
                padding: 3px;
                font-size: 15px;
                line-height: 1;
                color: #555555;
                font-weight: bold;
                *padding: 0 0 5px 145px;
                *line-height: 1.5;
            }

        .form-stacked fieldset {
            padding-top: 9px;
        }

        .background {
            min-height: 360px;
            height: 360px;
            padding-top: 80px;
            width: 966px;
            margin: 0 auto;
        }

        .conten {
            min-width: 487px;
            min-height: 317px;
            height: 317px;
            width: 487px;
            margin: 0px auto;
            border-radius: 5px;
            -webkit-border-radius: 5px;
            -moz-border-radius: 5px;
        }

        .rows {
            min-height: 30px;
            height: 30px;
            padding-bottom: 10px;
        }

        .col1 {
            width: 26%;
            height: 30px;
            float: left;
            line-height: 30px;
            color: #30302F;
            text-align: right;
            padding-right: 5px;
            font-weight: bold;
            font-size: 16px;
        }

        .col2 {
            width: 71%;
            height: 30px;
            line-height: 30px;
            float: left;
        }

        .text {
            width: 315px;
            height: 24px;
            background: Url('App_Themes/Theme/Images/Design/bg-text.jpg') no-repeat;
            border: none !important;
            border-radius: 8px;
            -moz-border-radius: 8px;
            -webkit-border-radius: 8px;
            padding: 2px 8px;
            outline: 0;
            font-size: 15px;
        }

            .text:focus {
                border: 0;
                border-color: red;
            }

        .GiuTT {
            color: #A9A190;
            position: absolute;
            right: 30px;
            padding: 0px 3px;
            font-size: 15px;
        }

            .GiuTT input {
                margin-left: 5px;
                color: White;
                font-size: 15px;
            }

        .button {
            float: right;
            margin-right: 10px;
        }
    </style>
    <script type="text/javascript">
        function ibtDangNhap_Click() {
            var TenDangNhap = $('#<%=txtTenDN.ClientID %>');
            var MatKhau = $('#<%=txtMatKhau.ClientID%>');
            var ThongBao = $('#<%=lbThongBao.ClientID %>');
            var emailFilter = /^[^@]+@[^@.]+\.[^@]*\w\w$/;
            if (trim(TenDangNhap.val()) == '') {
                ThongBao.html('Tên đăng nhập không được để trống');
                TenDangNhap.focus();
                return false;
            }
            if (!emailFilter.test(trim(TenDangNhap.val()))) {
                ThongBao.html('Tên đăng nhập không đúng định dạng mail');
                TenDangNhap.focus();
                return false;
            }
            if (trim(MatKhau.val()) == '') {
                ThongBao.html('Mật khẩu không được để trống');
                MatKhau.focus();
                return false;
            }
            if (trim(MatKhau.val()).length < 6) {
                ThongBao.html('Mật khẩu phải lớn hơn hoặc bằng 6 ký tự');
                MatKhau.focus();
                return false;
            }
            return true;
        }
        function trim(s) {
            return s.replace(/^\s+|\s+$/, '');
        }
    </script>
    <div class="column center" style="width: 771px; float: left; margin-left: 5px; margin-right: 5px;">

        <div class="background">
            <div class="conten">
                <fieldset class="form-stacked">
                    <legend>Đăng nhập</legend>
                    <div style="padding: 15px 3px 10px 3px; min-height: 20px; text-align: center; font-size: 16px; color: #DD4B39;">
                        <asp:Label runat="server" ID="lbThongBao"></asp:Label>
                    </div>

                    <div>
                        <div class="rows">
                            <div class="col1">
                                Tên đăng nhập
                            </div>
                            <div class="col2">
                                <asp:TextBox runat="server" ID="txtTenDN" CssClass="text"></asp:TextBox>
                            </div>
                        </div>
                        <div class="rows">
                            <div class="col1">
                                Mật khẩu
                            </div>
                            <div class="col2">
                                <asp:TextBox runat="server" ID="txtMatKhau" TextMode="Password" CssClass="text"></asp:TextBox>
                            </div>
                        </div>
                        <div class="rows" style="position: relative;">
                            <asp:CheckBox runat="server" ID="ckTrangThai" CssClass="GiuTT" Text="Duy trì trạng thái đăng nhập"
                                TextAlign="Left" />
                        </div>
                        <div class="rows" style="padding-right: 20px;">
                            <asp:ImageButton runat="server" ID="ibtDangNhap" CssClass="button" AlternateText=""
                                ImageUrl="~/App_Themes/Theme/Images/Design/bt-DangNhap.gif" OnClientClick="return ibtDangNhap_Click()"
                                OnClick="ibtDangNhap_Click" />
                            <asp:ImageButton runat="server" CssClass="button" ID="ibtDangKy" AlternateText=""
                                ImageUrl="~/App_Themes/Theme/Images/Design/bt-DangKy.gif" OnClick="ibtDangKy_Click" />
                        </div>
                    </div>
                </fieldset>
            </div>

        </div>

    </div>
</asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="ContentPlaceHolder_left">
</asp:Content>

